<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>申请查询</title>
    <link rel="stylesheet" href="__VENDOR__/css/head.css">
    <link rel="stylesheet" href="__VENDOR__/css/foot.css">
    <link rel="stylesheet" href="__VENDOR__/css/demand.css">
    <script src="__VENDOR__/js/jquery-1.12.2.js"></script>
    <script src="__VENDOR__/js/button.js"></script>
    <script src="__VENDOR__/js/ajax.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/jquery.validation/1.14.0/validate-methods.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/jquery.validation/1.14.0/messages_zh.js"></script>
</head>
<body style="background: #f6f6f6 ">
<div class="head">
    <div class="head_div">
        <img style="float: left;display: block;margin-top: -10px" src="/Public/Home/extend/img/banner1.jpg" alt="">
        <div class="fl">
            <span>湖州交警支队在线审批</span>
            <span>http://www.hzjxj.com</span>
        </div>
        <div class="fr">
            <ul>
                <li><a href="/Home/Index/index.html">审批主页</a></li>
                <li><a href="/Home/Index/process.html">流程查询</a></li>
                <li><a href="/Home/Index/project.html">项目申请</a></li>
                <li><a href="/Home/Index/apply_for.html" class="hover">申请查询</a></li>
                <li><a href="/Home/Index/true_false.html">真伪查询</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="demand_content" >
    <div class="demand_div">
        <div class="demand_div1">
            <img src="__VENDOR__/img/1.jpg" alt="">
            <span>申请查询</span>
        </div>
    </div>
    <form class="form form-horizontal" id="form-send" >
        <div class="apply">
            <span><i>项目编号：</i><input type="text" placeholder="请输入项目编号" name="number"></span>
            <span><i>申请手机号：</i><input type="text" placeholder="请输入申请人手机号" name="validate_phone" id="validate_phone"></span>
            <span><i>验证码：</i><input style="width: 190px;" type="text" placeholder="请输入验证码" name="validate_code" id="validate_code">
                <input type="button" class="button" value="获取验证码" onclick="settime(this,'{{:U("Home/Validate/sendCode")}}','query_progress')">
            </span>
        </div>
        <div class="apply_div">
            <button id="submit" style="cursor: pointer">进度查询</button>
            <span id="wait_img" style="display:none;margin-left: 100px;"><img style="width:31px;" src="__PUBLIC__/default/loading-1.gif"></span>
        </div>
    </form>
    <form id="form-show" method="post">
        <input type="hidden" id="apply_id" name="apply_id">
        <input type="hidden" id="action" name="action" value="apply_for">
    </form>
</div>
<div id="foot"></div>
</body>

<script type="text/javascript">
    $(function(){
        $("#form-send").validate({
            rules: {
            },
            onkeyup: false,
            focusCleanup: true,
            success: "valid",
            submitHandler: function (form) {
                $(form).ajaxSubmit({
                    type: 'post',
                    url: "{{:U('Home/Ajax/QueryProgress')}}",
                    beforeSend:function(){
                        $('#submit').hide();
                        $('#wait_img').show();
                    },
                    success: function (data) {
                        if (data.status) {
                            $("#apply_id").val(data.info);
                            $("#form-show").attr("action","{{:U('Home/Index/QueryProgress')}}");
                            $("#form-show").submit()
                        } else {
                            $('#wait_img').hide();
                            $('#submit').show();
                            layer.msg(data.info, {icon: 2, time: 1000});
                        }
                    },
                    error: function (XmlHttpRequest, textStatus, errorThrown) {
                        layer.msg('error!', {icon: 5, time: 1000});
                    }
                });
            }
        });

    })

</script>
</html>